package org.crazyit.app.action;

import com.opensymphony.xwork2.ActionSupport;

public class LoginAction extends ActionSupport {
	private String username;
	private String password;

	// username的setter和getter方法
	public void setUsername(String username) {
		this.username = username;
	}

	public String getUsername() {
		return username;
	}

	// password的setter和getter方法
	public void setPassword(String password) {
		this.password = password;
	}

	public String getPassword() {
		return password;
	}

	public String execute() throws Exception {
		System.out.println("进入execute方法执行体..........");
		Thread.sleep(1500);
		if (getUsername().equals("crazyit.org") 
			&& getPassword().equals("leegang")) {
			return SUCCESS;
		}
		return ERROR;
	}
}
